import React, { Component } from 'react';

import {withRouter} from "react-router-dom"

class list extends Component {
    constructor(props) {
        super(props)
        this.state = {
            
        }
    }


   


    render() {
        return (
            <div>
                <div className='crat-huangou'>
                    <div className='crat-huangou-left'>换购</div>
                    <div className='crat-huangou-text'>满¥<span>200</span>,享超换购</div>
                    <div className='crat-huangou-right'>立即挑选&gt;</div>
                </div>
                {
                    this.props.shoplist.map((item, index) => {
                        return (
                            <div className='cart-list' key={index}>
                                <div className='list-item'>
                                    {/* <input type="checkbox" /> */}
                                    <div className='pic'><img src={item.pic} alt="" /></div>
                                    <div className='name'>
                                        <div className='text'>{item.name}</div>
                                        <section>
                                            <div className='baoyou'>包邮包税</div>
                                        </section>
                                        <section>
                                            <div className='man'>满¥200/800,享超值换购</div>
                                        </section>
                                        <section>
                                            <div className='huifu'>3天后恢复原价</div>
                                        </section>

                                        <div className='price'>
                                            <span className='money'>¥{item.salesPrice.value}</span>
                                            <div className='input'>
                                                <button onClick={() => { this.props.del(item.id) }}>删除</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        )
                    })
                }

            </div>
        );
    }
}

export default withRouter(list);